package com.core.ssh2;

import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.ServletActionContext;

//import com.base.action.PersonnelListAction;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.Result;

public class MyByteResult implements Result {

	/**
	 * 
	 */
	private static final long serialVersionUID = 4701996792027854068L;

	public void execute(ActionInvocation invocation) throws Exception {
//		PersonnelListAction action = (PersonnelListAction) invocation.getAction();
		HttpServletResponse response = ServletActionContext.getResponse();

        response.setContentType("image/jpeg");
        response.setContentLength(1024);
        response.setHeader("Pragma", "No-cache");
        response.setHeader("Cache-Control", "no-cache");
        response.setDateHeader("Expires", 0L);

//        response.getOutputStream().write();
        response.getOutputStream().flush();
	}

}
